<template>
  <div id="app">
    <div>
      <el-button :type="$route.path == '/' ? 'success' : 'primary'" @click="$router.push('/')">
        Hello 路由
      </el-button>
      <el-button :type="$route.path == '/a-page' ? 'success' : 'primary'" @click="$router.push('/a-page')">
        A 路由
      </el-button>
      <el-button :type="$route.path == '/b-page' ? 'success' : 'primary'" @click="$router.push('/b-page')">
        B 路由
      </el-button>
    </div>
    <keep-alive>
      <router-view></router-view>
    </keep-alive>
  </div>
</template>

<script>
// import Hello from '@components/HelloWorld'

export default {
  name: 'App',
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
